﻿using System;
using AccessControl.Contracts.Models;

namespace AccessControl.Data.Models
{
    /// <summary>
    /// Represents position
    /// </summary>
    /// <remarks></remarks>
    public class Position : Model, IPosition
    {
        #region Fields

        double _X, _Y;

        #endregion

        #region Public Properties

        /// <summary>
        /// Gets or sets the X.
        /// </summary>
        /// <value>
        /// The X.
        /// </value>
        public double X
        {
            get { return _X; }
            set
            {
                if (_X != value)
                {
                    _X = value;
                    NotifyPropertyChanged("X");
                }
            }
        }

        /// <summary>
        /// Gets or sets the Y.
        /// </summary>
        /// <value>
        /// The Y.
        /// </value>
        public double Y
        {
            get { return _Y; }
            set
            {
                if (_Y != value)
                {
                    _Y = value;
                    NotifyPropertyChanged("Y");
                }
            }
        }
        
        #endregion
    }
}
